Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

204
Visualizações
Special character "?" is converted to unicode when set in location pathname

I have an issue where I set the window's path to '/payment/success?username=the+users+name' by using the following code:

window.location.pathname = `/payment/success?userName=the+users+name}`;

The issue is, that the page reloads, the actual path turns out to be:

/payment/success/account-created%3FuserName=the+users+name

For some reason, either JS or the browser is converting my "?" into "%3F", and I can't parse the paramater set in the url.

How can I stop it from encoding the special character?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda